package main

func main() {
	
}
type PathError struct { //声明类型
	Op string
	Path string
	Err error
}
	 //error方法属于PathError类
func (e * PathError) Error() string{
	return e.Op+" "+e.Path+": "+e.Err.Error()
}
/*func Stat(name string) (fi FileInfo, err error) {
	var stat syscall.Stat_t
	err = syscall.Stat(name, &stat)
	if err != nil {
		return nil, &PathError{"stat", name, err}
	}
	return fileInfoFromStat(&stat, name), nil
}*/